Skip to content

fix(heartbeat): skip post-close schedules on early-close days - #821

Merged
Pigbibi merged 1 commit into
mainfrom
fix/heartbeat-us-early-close-calendar
Nov 28, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/heartbeat-us-early-close-calendar

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

AI

  • Assisted by Antigravity (owner-directed CI remediation).

Summary

  • Add _market_early_close_cutoffs in runtime_heartbeat_policy.py using pandas_market_calendars.early_closes() (plus optional early_closes_loader hook on filter_due_targets).
  • On early-close sessions (such as US Black Friday closing at 13:00 ET / 18:00 UTC), scheduled due_at timestamps after market_close are excluded from latest_due_at, preventing false-positive missed-receipt alerts when strategies do not run at their regular late-afternoon slot.
  • Add unit tests in tests/test_runtime_heartbeat_policy.py covering 2026-11-27 Black Friday with both injected loaders and real pandas_market_calendars.

Verification

  • uv run --extra dev pytest tests/test_runtime_heartbeat_policy.py tests/test_digest_candidates.py -v
  • PYTHONPATH=src python3 -m pytest tests/test_runtime_heartbeat_policy.py -v

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T13:31:16.891241Z 6922bde PR opened
🔒 Security Review ✅ Completed 2026-11-28T13:32:43.487074Z 6922bde PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 28, 2026
@Pigbibi
Pigbibi merged commit 80a4a7f into main Nov 28, 2026
16 of 18 checks passed
@Pigbibi
Pigbibi deleted the fix/heartbeat-us-early-close-calendar branch November 28, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved Owner approval for high-risk PRs. AI agents must never apply this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant